# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-path
pkgver=16.2.0
pkgrel=1
pkgdesc="Module wrapper for os.path"
url="https://github.com/jaraco/path"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://github.com/jaraco/path/archive/v$pkgver/path-v$pkgver.tar.gz"
builddir="$srcdir/path-$pkgver"

prepare() {
	default_prepare

	sed -e '/setuptools_scm/d' \
		-e "/^\[metadata\]/a version = $pkgver" \
		-i setup.cfg
}

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
565e49b45c6fdadcb8d4e15e3d529c10044c943b8adccc97ba08195423907335e9ae54272bb90bee6a3ee74791caf98f6f7bc402c36b84a8bd7b45019f2fc42f  path-v16.2.0.tar.gz
"
